From: Matthew Barnes Date: Wed, 4 Feb 2015 02:44:38 +0000 (-0500) Subject: tests: Add a test case for unwritable repos X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~829 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6b16aba5f9de5f1599b1077bac1492db981c24fe;p=ostree.git tests: Add a test case for unwritable repos --- diff --git a/tests/basic-test.sh b/tests/basic-test.sh index da62c0d0..2c0455e5 100755 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -368,3 +368,14 @@ mkdir -p test2-checkout cd test2-checkout touch should-not-be-fsynced $OSTREE commit -b test2 -s "Unfsynced commit" --fsync=false + +cd ${test_tmpdir} +rm -f expected-fail error-message +$OSTREE init --mode=archive-z2 --repo=repo-noperm +chmod -w repo-noperm +$OSTREE --repo=repo-noperm pull-local repo 2> error-message || touch expected-fail +assert_has_file expected-fail +assert_file_has_content error-message "Permission denied" +chmod +w repo-noperm +echo "ok unwritable repo was caught" +